package com.sphd.beautysalon.presenter;


import com.android.volley.VolleyError;
import com.sphd.beautysalon.model.AddEticketModelImpl;
import com.sphd.beautysalon.view.AddEticketView;

/**
* Created by Hu on 2016/12/16
*/

public class AddEticketPresenterImpl implements AddEticketPresenter {
    AddEticketModelImpl addEticketModel;
    AddEticketView addEticketView;

    public AddEticketPresenterImpl(AddEticketView addEticketView) {
        this.addEticketView = addEticketView;
        addEticketModel=new AddEticketModelImpl();
    }

    @Override
    public void addData(String url) {
        addEticketView.showLoading();
            addEticketModel.sendUrl(url,this);
    }

    @Override
    public void sendError(VolleyError error) {
        addEticketView.dissLoading();
    }

    @Override
    public void recRes(int res) {
        addEticketView.recRes(res);
        addEticketView.dissLoading();
    }
}